import React, { Component } from 'react'
import styles from '../style.less'
import cookie from 'js-cookie'
import { Button } from 'antd'
import { hashHistory } from '@utils'
export default class extends Component {
  logout = () => {
    cookie.remove('token')
    hashHistory.replace('/login')
  }
  render() {
    return (
      <div className={styles.header}>
        <div className={styles.action}>
          <Button type="primary" onClick={this.logout}>
            退出
          </Button>
        </div>
      </div>
    )
  }
}
